package ltd.sshine.websocket.Controller;

import ltd.sshine.websocket.WebSocketStruct.WebSocket;
import org.springframework.stereotype.Component;

import javax.websocket.OnClose;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;

@Component
@ServerEndpoint(value = "/websocket")
public class WebSocket1 extends WebSocket {

    @Override
    //开
    @OnOpen
    public void onOpen(Session session) {
        super.onOpen(session);
    }

    @Override
    @OnClose
    public void onClose() {
        super.onClose();
    }

    @Override
    @OnMessage
    public void onMessage(String message) {
        super.onMessage(message);
    }
}
